# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExplanationMetadataInputMetadataFeatureValueDomain do
  @moduledoc """
  Domain details of the input feature value. Provides numeric information about the feature, such as its range (min, max). If the feature has been pre-processed, for example with z-scoring, then it provides information about how to recover the original feature. For example, if the input feature is an image and it has been pre-processed to obtain 0-mean and stddev = 1 values, then original_mean, and original_stddev refer to the mean and stddev of the original feature (e.g. image tensor) from which input feature (with mean = 0 and stddev = 1) was obtained.

  ## Attributes

  *   `maxValue` (*type:* `number()`, *default:* `nil`) - The maximum permissible value for this feature.
  *   `minValue` (*type:* `number()`, *default:* `nil`) - The minimum permissible value for this feature.
  *   `originalMean` (*type:* `number()`, *default:* `nil`) - If this input feature has been normalized to a mean value of 0, the original_mean specifies the mean value of the domain prior to normalization.
  *   `originalStddev` (*type:* `number()`, *default:* `nil`) - If this input feature has been normalized to a standard deviation of 1.0, the original_stddev specifies the standard deviation of the domain prior to normalization.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :maxValue => number() | nil,
          :minValue => number() | nil,
          :originalMean => number() | nil,
          :originalStddev => number() | nil
        }

  field(:maxValue)
  field(:minValue)
  field(:originalMean)
  field(:originalStddev)
end

defimpl Poison.Decoder,
  for:
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExplanationMetadataInputMetadataFeatureValueDomain do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExplanationMetadataInputMetadataFeatureValueDomain.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for:
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExplanationMetadataInputMetadataFeatureValueDomain do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
